package com.xiaotu.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author zhangxiao
 * @create 2021-09-06 16:34
 */
@Aspect
@Component
@Slf4j
public class MonitoringInterfaceCallAspect {


    //抽取公共的切入点表达式
    @Pointcut("execution(public * com.xiaotu..*Controller.*(..)) && @annotation(com.xiaotu.annotation.MonitoringInterfaceCall)")
    public void pointCut() {

    }

    @Before("pointCut()")
    public void logMonitoringInterface() {
        log.info("监控接口调用 功能开启了。。。");
    }
}
